import request from "@/utils/request";


export function stockList(query) {
  return request({
    url: '/stock/stockList/list',
    method: 'get',
    params: query
  })
}
export function synchronousUpdate() {
  return request({
    url: '/stock/stockList/synchronousUpdate',
    method: 'post',
  })
}
export function lineList(a) {
  return request({
    url: '/stock/klinegraph/lineList',
    method: 'post',
    params:a
  })
}
export function account() {
  return request({
    url: '/stock/klinegraph/account',
    method: 'post',
  })
}
export function updateAccount(query) {
  return request({
    url: '/stock/klinegraph/updateAccount',
    method: 'post',
    params:query
  })
}
export function buyList(symbol,trade) {
  return request({
    url: '/stock/klinegraph/buyList?symbol='+symbol+'&trade='+trade,
    method: 'post',
  })
}
export function getSellList(symbol,trade) {
  return request({
    url: '/stock/klinegraph/sellList?symbol='+symbol+'&trade='+trade,
    method: 'post',
  })
}

export function toPay(name,addPrice) {
  return request({
    url: '/stock/klinegraph/toPay?name='+name+'&addPrice='+addPrice,
    method: 'get',
  })
}
export function getNameBySymbol(symbol) {
  return request({
    url: '/stock/klinegraph/getNameBySymbol?symbol='+symbol,
    method: 'post'
  })
}
export function getBuying(query) {
  return request({
    url: '/stock/klinegraph/getBuying',
    method: 'post',
    params:query
  })
}
export function getSelling(query) {
  return request({
    url: '/stock/klinegraph/getSelling',
    method: 'post',
    params:query
  })
}

export function getTimesharing(query) {
  return request({
    url: '/stock/stockList/timesharing',
    method: 'post',
    params:query
  })
}

export function getMyPosition() {
  return request({
    url: '/stock/stockList/myPosition',
    method: 'post',
  })
}

export function getEntrustAllList() {
  return request({
    url: '/stock/klinegraph/entrustAllList',
    method: 'get',
  })
}
export function successEntrustList() {
  return request({
    url: '/stock/klinegraph/successEntrustList',
    method: 'get',
  })
}

export function errorEntrustList() {
  return request({
    url: '/stock/klinegraph/errorEntrustList',
    method: 'get',
  })
}
